Release 10.1A: OpenEdge Data Management:
Database Administration


Activating a single index

Indexes that are added to your database while it is online are inactive until you specifically initiate activation with PROUTIL IDXACTIVATE. When you run IDXACTIVATE you provide the name of one inactive index on the command line. The general syntax is as follows:

proutil db-name -C idxactivate [owner-name.]table-name.index-name 
          [useindex table-name.index-name] [recs n] [refresh t] 

See the "PROUTIL IDXACTIVATE qualifier" section for the details of the command.

Prior to activating the index, IDXACTIVATE checks to make sure that there are no users with a schema timestamp that is earlier than the schema timestamp of the index. If any such users are connected to the database, IDXACTIVATE cannot proceed. You are given the option of waiting or cancelling the index activation. If you chose to wait, you must wait until all the users with an earlier schema timestamp disconnect, or you can use PROSHUT to forcibly remove the connections. You control the update of the status display of blocking users with the refresh option. The number supplied to refresh indicates the number of seconds between displays of blocking users.

When IDXACTIVATE activates and builds the index, it bundles records into transactions. By default, 100 records are bundled into one transaction. You can alter that number with the recs option. The number you specify for the recs option is the number of records to bundle into one transaction.

The following output shows the output of IDXACTIVATE. In this example the index tst_table.inact3 is activated for the database doc_db; no optional parameters are specified so default values are used. The cycle of waiting for users to disconnect executes twice before all the users with old timestamps are disconnected and the index is activated.

$ proutil doc_db -C idxactivate tst_table.inact3  
OpenEdge Release 10.1A1P as of Tue Oct 18 20:11:37 EDT 2005 
Index Activate: BEGIN activation of inact3. (13258) 
Index Activate: recs value: 100 refresh rate: 60. (13259) 
Activating Index inact3  at Database timestamp 1129752317 . (12811) 
  Usr     Name     Type      Pid Timestamp 
  
       5  docusr1 Usr         10336 1129580580  
       6  docusr2 Usr         11208 1129580580  
Connections with timestamps older than 1129752317  exist. (13246) 
Do you wish to continue waiting..... Type y to continue (y/n). (13247) 
y 
Usr     Name     Type      Pid Timestamp 
  
       5  docusr1 Usr         10336 1129580580  
Connections with timestamps older than 1129752317  exist. (13246) 
Do you wish to continue waiting..... Type y to continue (y/n). (13247) 
y 
Index Activate: Index inact3  No. 33  - 0 keys added. (13244) 
Index Activate: Index inact3  No. 33  - 0 keys processed. (13245) 
Index Activate: Index inact3 has been activated. 
$  

Once the IDXACTIVATE command completes, the index is active and all users can access it.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095